import request from "../utils/request"
import utils from "../utils/util.js"
export default {

	/**
	 * 宠物侦探
	 * @param {Object} query
	 */
	getPetDetectiveList(query) {
		const queryParmas = utils.addParamsToURL(query);
		return request.get(`/pet/detective/list?${queryParmas}`);
	},

	addPetDetective(data) {
		return request.post('/pet/detective/add1', data);
	},

	getPetDetectiveById(id) {
		return request.get(`/pet/detective/${id}`)
	},
	delPetDetectiveById(id) {
		return request.request(`/pet/detective/${id}`, 'DELETE')
	},

	/**
	 * 宠物报丢
	 * @param {Object} query
	 */
	getPetReportLossList(query) {
		const queryParmas = utils.addParamsToURL(query);
		return request.get(`/pet/reportLoss/list?${queryParmas}`);
	},

	addPetReportLoss(data) {
		return request.post('/pet/reportLoss/addReportLoss', data);
	},

	getPetReportLossById(id) {
		return request.get(`/pet/reportLoss/${id}`)
	},

	delPetReportLossById(id) {
		return request.request(`/pet/reportLoss/${id}`, 'DELETE')
	},

	/**
	 * 宠物悬赏
	 * @param {Object} query
	 */
	getPetLossOfferList(query) {
		const queryParmas = utils.addParamsToURL(query);
		return request.get(`/pet/lossOffer/list?${queryParmas}`);
	},

	addPetLossOffer(data) {
		return request.post('/pet/lossOffer/add1', data);
	},

	getPetLossOfferById(id) {
		return request.get(`/pet/lossOffer/${id}`)
	},
	delPetLossOfferById(id) {
		return request.request(`/pet/lossOffer/${id}`, 'DELETE')
	},
}